<template>
  <div>
    <header class="wrap">
      <i class="iconfont iconfont-fanhui" @click="goBack"></i>
      <span><slot></slot></span>
      <slot name="search"></slot>
    </header>
  </div>
</template>

<script>
export default {
  methods: {
    goBack() {
      this.$router.go(-1);
    },
  },
};
</script>

<style lang="scss" scoped>
@import "../../common/style/mixin";
header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 88px;
  text-align: center;
  line-height: 88px;
  padding: 0 20px;
  font-size: 34px;
  background-color: #eee;
  @include boxSizing;
  .iconfont {
    position: absolute;
    left: 20px;
    top: 0;
    font-size: 40px;
    font-weight: bold;
  }
}
</style>